how to see chrome sync storage and local storage

153

how to see chrome sync storage and local storage -

//It is true that stuff saved using chrome.storage does not show up in developer tools, there you can only see stuff saved using regular localStorage API. Do this:

//Open your extension's background page by going to chrome://extensions/ ("Developer mode" needs to be checked to see background pages)

//Go to the Console tab and type this:

chrome.storage.local.get(function(result){console.log(result)})

//This will spit the whole storage as a JSON object into the console.
//The slightly shorter equivalent is chrome.storage.local.get(console.log). There's also chrome.storage.sync.get(console.log)

Comments

Submit
0 Comments